---
id: 65822bd82d708c4895080c35
title: Step 9
challengeType: 20
dashedName: step-9
---

# --description--

You can access values in a dictionary through its keys. You need to use the bracket notation and include the key between the square brackets:

```py
my_dict = {'amount': 50.0, 'category': 'Food'}
my_dict['amount'] # 50.0
```

You are currently interpolating the `expense` dictionary in your f-string. Modify the f-string expression to access the value of the `'amount'` key and the `'category'` key in the `expense` dictionary.

# --hints--

You should pass `f'Amount: {expense["amount"]}, Category: {expense["category"]}'` to your `print()` call. Remember to use double quotes within your single-quoted f-string and vice versa.

```js
({ test: () => assert.match(code, /^\s+print\s*\(\s*f("|')Amount: \{\s*expense\s*\[\s*(?=[^\1])("|')amount\2\s*\]\s*\}, Category: \{\s*expense\s*\[\s*(?=[^\1])("|')category\3\s*\]\s*\}\1\s*\)/m) })
```

# --seed--

## --seed-contents--

```py
def add_expense(expenses, amount, category):
    expenses.append({'amount': amount, 'category': category})
    
--fcc-editable-region--
def print_expenses(expenses):
    for expense in expenses:
        print(f'Amount: {expense}, Category: {expense}')
--fcc-editable-region--

expenses = []
```
